<template>
	<!-- 地图 -->
	<view>
		<view class="page-body">
			<view class="page-section page-section-gap">
				<map style="width: 100%; height: 300px;" :latitude="`${foundInfo.latitude}`"
					:longitude="`${foundInfo.longitude}`" :markers="covers">
				</map>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				backEndUrl: this.backEndUrl,
				foundInfo: {},
				searchValue: '',
				ColorList: this.ColorList,
				/**
				 * 一些好看的小图标
				 */
				CustomBar: this.CustomBar,
				cuIcon: [{
					name: 'appreciate',
					isShow: true
				},{
					name: 'location',
					isShow: true
				}]
			};
		},
		methods: {
			open() {
				this.$refs.calendar.open();
			},
			confirm(e) {
				console.log(e);
			},
			fetchFoundInfo() {
				this.$axios({
					method: 'get',
					url: '/index/foundInfo'
	
				}).then(res => {
					this.foundInfo = res.data;
	
				}).catch(err => {
					console.log(err)
				})
			},
			search() {
				console.log("========", this.searchValue)
				this.$axios({
					method: 'get',
					url: '/index/search',
					params: {scenicName: this.searchValue}
				}).then(res => {
					this.foundInfo = res.data;
				}).catch(err => {
					console.log(err)
				})
			},
			
			
		},
		mounted() {
			this.fetchFoundInfo()
		}
	}
</script>

<style>
</style>